package com.xxx.td;

/**
 * @version v1.0
 * @Description:
 * @Author zhanzhongxin
 * @Date 2021/7/30 9:53
 * @Copyright 博为峰
 */
public class Test01 {

    public static void print() {
        for (int i = 0; i < 100; i++) {
            System.out.println("i = " + i);
        }
    }

    public static void main(String[] args) throws InterruptedException {
//        print();
        final ThreadDemo03 thread1 = new ThreadDemo03();
        thread1.start();

        final ThreadDemo03 thread2 = new ThreadDemo03();
        thread2.start();
        Thread.sleep(1000);
        for (int i = 0; i < 1000; i++) {
            Thread.sleep(1000);
            System.out.println(Thread.currentThread().getName() + ",i = " + i);
        }
        //主线程
    }
}
